import {titleList} from './titleList'
import {shop} from './shop'
import {list} from './list'
let apis={
    "/titleList·GET":titleList,
    "/shop·GET":shop,
    "/list·GET":list,
}
function getApi(app){
  
    //我要开始去拼写一些app.get(path,callback(req,res))
    for(let key in apis){
        let result=key.split('·');
        if(result[1]==='GET'){
            app.get(result[0],apis[key])
        }
        if(result[1]==='POST'){
            app.post(result[0],apis[key])
        }
    }
}
export {getApi}